<div class="space"></div>

<div class="box">
	<div class="box-header">Bảng Dữ Liệu Môn Học</div>
	<div class="box-content">
	<table class="tabular-data image">
		<thead>
			<tr>
				<th scope="col" id="code">Mã Môn Học</th>
				<th scope="col" id="subname">Tên Môn Học</th>
				<th scope="col" id="percent">Phần Trăm Kiểm Tra</th>
				<th scope="col" id="task">Thao Tác</th>
			</tr>
		</thead>
		
		<tfoot>
			<tr>
				<td colspan="4">
					<div id="navlist" >
						<ul>
							<?php for($i = 0; $i < $pages; ++$i) { ?>
								<li><a href="?add_subject&index=<?php echo $i; ?>"><?php echo $i + 1; ?></a></li>
							<?php }?>
						</ul>			
					</div>
				</td>
			</tr>
		</tfoot>
		
		<tbody>
			<?php foreach($subjects as $subject): ?>
			<tr>		
				<td class="code"><?php echo $subject['subject_id']?></td>
				<td><?php echo $subject['subject_name']?></td>
				<td><?php echo $subject['test_percentage']?></td>
				<td>
					<form method="post" action="">
						<input type="hidden" name="subject_id" value="<?php echo $subject['subject_id']; ?>" />
						<input class="button edit" type="submit" onclick="savPos( this.form )" name="action" value="Sửa MH" />
						<input class="button delete" type="submit" onclick="savPos( this.form )" name="action" value="Xóa MH" />
					</form>
				</td>	
			</tr>
			<?php endforeach; ?>	
		</tbody>
	</table>
	</div><!-- close box content -->
</div><!-- close box -->

<div class="space"></div>